class DeathKnightZombieController extends SRMonsterController;

var float ProvokeTimeThreshold,ProvokeTimer;

state ZombieCharge
{
	function Tick( float Delta )
	{
		local DKDeathKnight ZGC;
        Global.Tick(Delta);

		if( ProvokeTimer < ProvokeTimeThreshold )
		{
            ProvokeTimer += Delta;

            if( ProvokeTimer >= ProvokeTimeThreshold )
            {
                ZGC = DKDeathKnight(Pawn);

                if( ZGC != none && !ZGC.bCannotInterrupt )
                {
                    ZGC.StartAnchorEnemy();
                }
            }
		}
	}


	function bool StrafeFromDamage(float Damage, class<DamageType> DamageType, bool bFindDest)
	{
		return false;
	}

	// I suspect this function causes bloats to get confused
	function bool TryStrafe(vector sideDir)
	{
		return false;
	}

	function Timer()
	{
        Disable('NotifyBump');
		Target = Enemy;
		TimedFireWeaponAtEnemy();
	}

	function BeginState()
	{
        super.BeginState();

		ProvokeTimeThreshold = default.ProvokeTimeThreshold + FRand() * 7.0;
		ProvokeTimer = 0;
	}

WaitForAnim:

	if ( Monster(Pawn).bShotAnim )
	{
		if ( !DKDeathKnight(Pawn).bCannotInterrupt )
			Goto('Moving');
	}
	if ( !FindBestPathToward(Enemy, false,true) )
	if ( !DKDeathKnight(Pawn).bCannotInterrupt )
		GotoState('ZombieRestFormation');

Moving:
	MoveToward(Enemy);
	WhatToDoNext(17);
	if ( bSoaking )
		SoakStop("STUCK IN CHARGING!");
}

defaultproperties
{
	ProvokeTimeThreshold=8
}
